package com.yeskery.nut.annotation.condition;

import com.yeskery.nut.bean.condition.OnExistPropertyCondition;

import java.lang.annotation.*;

/**
 * 环境参数值存在的条件判断注解
 * @author sunjay
 * 2025/5/12
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Conditional(OnExistPropertyCondition.class)
public @interface ConditionalOnExistProperty {

    /**
     * 环境参数值key数组
     * @return 环境参数值key数组
     */
    String[] value() default {};

    /**
     * 环境参数值key前缀
     * @return 环境参数值key前缀
     */
    String prefix() default "";
}
